<template>
  <el-radio-group v-model="input">
    <el-radio label="正常">正常</el-radio>
    <el-radio label="只读">只读</el-radio>
    <el-radio label="禁用">禁用</el-radio>
  </el-radio-group> 
</template>

<script setup>
import { ref, watch } from 'vue';
const props = defineProps({
  modelValue: {
    type: String,
    default: '选填',
  },
});

const emit = defineEmits(['update:modelValue']);

const input = ref(props.modelValue);

watch(input, (newValue) => {
  emit('update:modelValue', newValue);
});

</script>